<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        div{
            width: 500px;
            height: 500px;
            background:#779dbd;
            padding: 100px;
            border: 1px solid black;
            margin: 50px auto;
            position: relative;
            -webkit-perspective-origin:right top;
            -webkit-perspective:600px;
            transform: rotateX(10deg) rotateY(30deg);
        }
        /*vw可视宽/
        /*vh 可视高度/
           /*transform-style: preserve-3d;*/
            /*perspective: 500px;*/
            /*perspective-origin: 50% -50%;*/
            /*transform: rotate3d(1.2 ,1, 1.8, 45deg);*/



        span {
            display: inline-block;
            width: 200px;
            height: 200px;
           background: greenyellow;
            transition: 2s;
            margin: 100px;
            position: absolute;
            transform-style: preserve-3d;
            perspective: 100px;
            perspective-origin:center;
            transform: translateY(100px) translateX(100px) translateZ(100px);
        }
        span:hover{
            transform:translateZ(100px) rotateZ(360deg);




        }
        span:nth-of-type(1){
            background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
            transform: translateZ(100px);
        }
        span:nth-of-type(2) {
            /*transform: translateY(50px) translateX(50px) translateZ(50px);*/
            background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
            transform: translateZ(-100px);
        }
        span:nth-of-type(3) {
            background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
            transform: translateX(-100px) rotateY(90deg);
        }
        span:nth-of-type(4) {
             background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
             transform: translateX(100px) rotateY(90deg);
         }
        span:nth-of-type(5) {
            background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
            transform: translateY(100px) rotateX(90deg);
        }
        span:nth-of-type(6) {
            background: -webkit-radial-gradient(rgba(20, 20, 20, 0.1), #000000);
            transform: translateY(-100px) rotateX(90deg);
        }


    </style>

</head>
<body>
<div>
    <span style="background:greenyellow">1</span>
 <span style="background: green">2</span>
 <span style="background: aquamarine">3</span>
    <span style="background: blueviolet">4</span>
    <span style="background:orange">5</span>
    <span style="background:sienna">6</span>

</div>

</body>
</html>